/**
 * Copyright (C), 2015-2019, XXX有限公司
 * FileName: WaybillServiceImpl
 * Author:   李毅
 * Date:     2019/10/31 22:29
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.ymtms.settlement.service.impl;

import com.ymtms.settlement.dao.WaybillMapper;
import com.ymtms.settlement.exception.BalanceException;
import com.ymtms.settlement.pojo.Waybill;
import com.ymtms.settlement.service.WaybillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 〈一句话功能简述〉<br> 
 * 〈〉
 *
 * @author 李毅
 * @create 2019/10/31
 * @since 1.0.0
 */
@Service
public class WaybillServiceImpl implements WaybillService {

    @Autowired
    WaybillMapper waybillMapper;

    @Override
    public Waybill findWaybillBygmid(Integer gmid) {
       Waybill waybill = waybillMapper.selectByGmid(gmid);
       if (waybill == null) {
           throw new BalanceException("查询运输表失败，请重试！");
       }
       return waybill;
    }
}